/*
 * @Description: 
 * @Version: 0.1
 * @Autor: 许振富 zfgj201511
 * @Date: 2025-01-17 13:58:30
 * @FilePath: \hlk_protocol\zw0906_test.c
 * @LastEditors: 许振富(jia)
 * @LastEditTime: 2025-01-17 15:06:41
 */
#include "stdio.h"
#include "zw0906_protocol.h"
unsigned char test_buf[] = "\xef\x01\xff\xff\xff\xff\x07\x00\x03\x00\x00\x0a";
__zw0906_protocol zw0906_p;
int main(void)
{
    zw0906_protocol_Init(&zw0906_p);
    printf("end\n");
    for (size_t each = 0; each < sizeof(test_buf); each++)
    {
        zw0906_protocol_Receive_Byte(&zw0906_p,test_buf[each]);
    }
    unsigned char buf[1024] = {0};
    unsigned short len = 0;


    zw0906_protocol_Data_Packaging(0x01,0x01,(unsigned char*)0,0,buf,&len);
    printf("out:");
    for (size_t i = 0; i < len; i++)
    {       
        printf("0x%02X,",buf[i]);
    }
    
    return 0;
}